﻿Imports System.IO
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.OleDb
Imports Microsoft.VisualBasic


Public Class FrmKetNoi
    Private Sub cmd_KetNoi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmd_KetNoi.Click
        KetNoi()
    End Sub
    Private Sub KetNoi()
        If f_KetNoi(txt_S.Text, txt_D.Text, txt_U.Text, txt_P.Text) = True Then
            MessageBox.Show("Kết nối thành công")
            Dim frm As New FrmQuanLyKho
            Me.Hide()
            frm.ShowDialog()
        Else
            Return
        End If
    End Sub
    Private Sub cmd_Thoat_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmd_Thoat.Click
        Me.Close()
    End Sub

    Private Sub txt_S_TextChanged(sender As Object, e As EventArgs) Handles txt_S.TextChanged

    End Sub

    Private Sub FrmKetNoi_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    End Sub
    Protected Overrides Function ProcessDialogKey(keyData As Keys) As Boolean
        If (keyData.Equals(Keys.Enter)) Then
            KetNoi()
        End If
        Return MyBase.ProcessDialogKey(keyData)
    End Function
    
End Class